package action;

import java.io.FileInputStream;
import java.util.Comparator;
import java.util.List;


import comparetor.IdComparator;
import pojo.Customer;
import processor.DataProcessor;
import processor.impl.DataProcessorImpl;
import scanner.DataScanner;
import scanner.impl.DataScannerImpl;

public class DataProcessAction {
	private DataProcessor dp;
	private DataScanner scanner;
	public StringBuilder action(String format,Comparator<Customer> comp) throws Exception{
		DataScanner scanner=new DataScannerImpl(new FileInputStream("data.txt"));
		List<Customer> list=scanner.scann();
		dp=new DataProcessorImpl(list, format);
		StringBuilder sb=dp.process(comp);
		return sb;
	}
	
	
	public static void main(String[] args) throws Exception{
		
	}
}
